// ****************************************************************************
//
// Logic 90: Game-specific functions
//
// You should use this logic to perform any game specific functions, such as
// counting down timers, etc and processing player input related to the game
// (such as examining/using inventory items) and any other things that are
// required in several rooms that you don't want to duplicate in each room.
//
// This logic is called from logic 0, on every cycle.
// If you like, you could only make it called only when disable_game_functions
// is not set.
//
// Sierra did not use a separate logic for all this - they just did it all
// from logic 0. I find it is neater this way, as you can keep your game
// specific processing separate from other system-related things (although
// these may require some modification for your game). Also, this makes logic 0
// easier to manage.
//
// ****************************************************************************

#include "defines.txt"

// put all non-input-reponse game functions here

if (input_recieved &&
    unknown_word_no == 0 &&
    !input_parsed) {

// put various input responses here

  if ((said("bad word","rol") ||
       said("anyword", "bad word", "rol") ||
       said("anyword", "anyword", "bad word", "rol") ||
       said("anyword", "anyword", "anyword", "bad word","rol") ||
       said("anyword", "anyword", "anyword", "anyword", "bad word", "rol") ||
       said("anyword", "anyword", "anyword", "anyword", "anyword", "bad word", "rol"))) {
    v252 = v252 + 1;
    if (v252 == 1) {
      print("I am going to tell on you!");
    }
    if (v252 == 2) {
      print("Don't say anymore words like that!");
    }
    if (v252 == 3) {
      print("Don't say I didn't warn you.");
      quit(1);
    }
  }

  if (said("look", "sleep moss")) {
    if (has("sleep moss")) {
      show.obj(50);
    }
    else {
      print("You don't have any.");
    }
  }

  if (said("look","poison berries")) {
    if (has("poison berries")) {
       show.obj(53);
    }
    else {
       print("You don't have any.");
       }
    }

  if (said("look","sleep potion")) {
    if (has("sleep potion")) {
       show.obj(52);
       }
    else {
       print("You don't have one.");
       }
    }

  if (said("look","poison")) {
    if (has("poison")) {
       show.obj(51);
       }
    else {
       print("You don't have any.");
       }
    }

  if ((said("look", "anyword") ||
       said("look", "anyword", "anyword"))) {
    print("What? Where?");
  }

  if ((said("get", "anyword") ||
       said("get", "anyword", "anyword"))) {
    print("You can't get that here!");
  }

  if ((said("use", "anyword") ||
       said("use", "anyword", "anyword"))) {
    print("What do you want me to do with it?");
  }
}

return();